<div id="wrapper">
    <!-- h1 tag stays for the logo, you can use the a tag for linking the index page -->
    <h1><a href="#"><span>&nbsp;</span></a>Tài khoản: <?php echo $this->objLogin->member_username ; ?></h1>
    <br />
    <!-- You can name the links with lowercase, they will be transformed to uppercase by CSS, we prefered to name them with uppercase to have the same effect with disabled stylesheet -->
    <ul id="mainNav">
            <li><a href="#" class="active">TRANG QUẢN TRỊ</a></li> <!-- Use the "active" class for the active menu item  -->
            <li><a href="<?php echo $this->rootUrl ?>/default" >TRANG CHỦ</a></li>
            <li><a href="#">THIẾT LẬP</a></li>
            <li class="logout"><a href="<?php echo $this->rootUrl ?>/admin/index/logout">THOÁT</a></li>
    </ul>
    <!-- // #end mainNav -->

    <div id="containerHolder">
        <div id="container">
            <div id="sidebar">
                <ul class="sideNav">
                    <li><a href="#">Quản lý danh mục</a></li>
                    <li><a href="<?php echo $this->rootUrl ?>/admin/index/news" class="active" >Quản lý tin bài</a></li>
                    <li><a href="<?php echo $this->rootUrl ?>/admin/index/index" >Quản lý sản phẩm</a></li>
                    <li><a href="#">Giới thiệu</a></li>
                    <li><a href="#">Thông tin liên hệ</a></li>
                    <li><a href="#">Quản trị hệ thống</a></li>
                    <li><a href="#">Ngôn ngữ</a></li>
                </ul>
                <!-- // .sideNav -->
            </div>    
            <!-- // #sidebar -->
            <!-- h2 stays for breadcrumbs -->
            <h2><a href="#">Trang quản trị</a> &raquo; <a href="<?php echo $this->rootUrl ?>/admin/index/index" class="active">Quản lý tin bài</a></h2>
            <div id="main">
                <h3>Danh sách tin bài</h3>
                <table cellpadding="0" cellspacing="0">
                    <?php
                        if(is_array($aryListNews = $this->aryListNews)) {
                            foreach($aryListNews as $key=>$news) : 
                                if($news['news_id'] > 0 ) { ?>
                                    <tr <?php if($key%2==1) { ?> class="odd" <?php } ?> >
                                        <td><?php echo $news['news_title'];?></td>
                                        <td class="action"><a href="#" class="view">Chi tiết</a><a href="<?php echo $this->rootUrl ?>/admin/index/news/newsId/<?php echo $news['news_id'] ; ?>" class="edit">Sửa</a><a onclick="Admin.deleteNews(<?php echo $news['news_id'] ; ?>);" class="delete">Xóa</a></td>
                                    </tr>    
                    <?php 
                                }
                            endforeach;
                        } ?>               
                </table>
                <form action="save" class="jNice" method="post"  enctype="multipart/form-data" id="frmAddEditNews" name="frmAddEditNews" >
                <?php $aryInfo = $this->aryInfo ; ?>
                <h3>Chi tiết tin bài </h3>
                <fieldset>
                    <p><label>Ngày tạo tin:</label><input name="news_date"  id="news_date"  type="text" class="text-long w300" value="<?php if(isset($aryInfo['news_date'])) { echo str_replace('-', '/', $aryInfo['news_date'] ); } ?>"  /></p>
                        <p><label>Tiêu đề:</label><input name="news_title" type="text" class="text-long w300" value="<?php if(isset($aryInfo['news_title'])) { echo $aryInfo['news_title'] ; } ?>"  /></p>
                        <input name="news_id" type="hidden" value="<?php echo $aryInfo['news_id'] ; ?>" />
                        <input name="news_type" type="hidden" value="2" />
                        <p><label>Nội dung:</label><textarea id="news_content"  name="news_content" rows="1" cols="1"><?php if(isset($aryInfo['news_content'])) { echo $aryInfo['news_content'] ; } ?></textarea></p>
                        <p><label>Ảnh minh họa:</label><input type="file" id="news_image" name="news_image" class="text-long" /></p>
                        <input class="c-pointer" type="button" onclick="Admin.saveNews();" value="Cập nhật" />
                </fieldset>
                </form>
            </div>
            <div class="clear"></div>
        </div>
        <!-- // #container -->
    </div>	
    <!-- // #containerHolder -->
    <p id="footer">Nếu quí khách hàng cần tư vấn, giải đáp thắc mắc. <a href="mailto:tncdt2k48@gmail.com"> Hãy liên hệ ngay với chúng tôi</a></p>
</div>

<script type="text/javascript">
    $(document).ready(function(){
        //Admin.getHtmlEditor();   
        Admin.callDatePicker('news_date');
    });
</script>